package com.jasonjan.jiance.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by jasonjan on 2018/3/14.
 */

public class LoginBean {

    /**
     * code : 200
     * msg : success
     * debugMsg :
     * result : {"blacklist":[],"coins":"5","college":"计算机科学与教育软件学院","exp":"0","gender":"男","grade":"其他","icon":"/icon/default.ico","id":"100007407","level":"1","nickname":"dy","pushActivity":true,"pushComment":true,"pushLeaveWords":true,"pushSystem":true,"pushUrgentCollege":true,"pushUrgentSchool":true,"school":"广州大学","token":"cf1dcfef22d9c61e0367a5f98d7f7bd5"}
     */

    private String code;
    private String msg;
    private String debugMsg;
    private ResultBean result;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getDebugMsg() {
        return debugMsg;
    }

    public void setDebugMsg(String debugMsg) {
        this.debugMsg = debugMsg;
    }

    public ResultBean getResult() {
        return result;
    }

    public void setResult(ResultBean result) {
        this.result = result;
    }

    public static class ResultBean implements Parcelable {
        /**
         * blacklist : []
         * coins : 5
         * college : 计算机科学与教育软件学院
         * exp : 0
         * gender : 男
         * grade : 其他
         * icon : /icon/default.ico
         * id : 100007407
         * level : 1
         * nickname : dy
         * pushActivity : true
         * pushComment : true
         * pushLeaveWords : true
         * pushSystem : true
         * pushUrgentCollege : true
         * pushUrgentSchool : true
         * school : 广州大学
         * token : cf1dcfef22d9c61e0367a5f98d7f7bd5
         */

        private String coins;
        private String college;
        private String exp;
        private String gender;
        private String grade;
        private String icon;
        private String id;
        private String level;
        private String nickname;
        private boolean pushActivity;
        private boolean pushComment;
        private boolean pushLeaveWords;
        private boolean pushSystem;
        private boolean pushUrgentCollege;
        private boolean pushUrgentSchool;
        private String school;
        private String token;
        private List<?> blacklist;

        public String getCoins() {
            return coins;
        }

        public void setCoins(String coins) {
            this.coins = coins;
        }

        public String getCollege() {
            return college;
        }

        public void setCollege(String college) {
            this.college = college;
        }

        public String getExp() {
            return exp;
        }

        public void setExp(String exp) {
            this.exp = exp;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public String getGrade() {
            return grade;
        }

        public void setGrade(String grade) {
            this.grade = grade;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getLevel() {
            return level;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public boolean isPushActivity() {
            return pushActivity;
        }

        public void setPushActivity(boolean pushActivity) {
            this.pushActivity = pushActivity;
        }

        public boolean isPushComment() {
            return pushComment;
        }

        public void setPushComment(boolean pushComment) {
            this.pushComment = pushComment;
        }

        public boolean isPushLeaveWords() {
            return pushLeaveWords;
        }

        public void setPushLeaveWords(boolean pushLeaveWords) {
            this.pushLeaveWords = pushLeaveWords;
        }

        public boolean isPushSystem() {
            return pushSystem;
        }

        public void setPushSystem(boolean pushSystem) {
            this.pushSystem = pushSystem;
        }

        public boolean isPushUrgentCollege() {
            return pushUrgentCollege;
        }

        public void setPushUrgentCollege(boolean pushUrgentCollege) {
            this.pushUrgentCollege = pushUrgentCollege;
        }

        public boolean isPushUrgentSchool() {
            return pushUrgentSchool;
        }

        public void setPushUrgentSchool(boolean pushUrgentSchool) {
            this.pushUrgentSchool = pushUrgentSchool;
        }

        public String getSchool() {
            return school;
        }

        public void setSchool(String school) {
            this.school = school;
        }

        public String getToken() {
            return token;
        }

        public void setToken(String token) {
            this.token = token;
        }

        public List<?> getBlacklist() {
            return blacklist;
        }

        public void setBlacklist(List<?> blacklist) {
            this.blacklist = blacklist;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.coins);
            dest.writeString(this.college);
            dest.writeString(this.exp);
            dest.writeString(this.gender);
            dest.writeString(this.grade);
            dest.writeString(this.icon);
            dest.writeString(this.id);
            dest.writeString(this.level);
            dest.writeString(this.nickname);
            dest.writeByte(this.pushActivity ? (byte) 1 : (byte) 0);
            dest.writeByte(this.pushComment ? (byte) 1 : (byte) 0);
            dest.writeByte(this.pushLeaveWords ? (byte) 1 : (byte) 0);
            dest.writeByte(this.pushSystem ? (byte) 1 : (byte) 0);
            dest.writeByte(this.pushUrgentCollege ? (byte) 1 : (byte) 0);
            dest.writeByte(this.pushUrgentSchool ? (byte) 1 : (byte) 0);
            dest.writeString(this.school);
            dest.writeString(this.token);
        }

        public ResultBean() {
        }

        protected ResultBean(Parcel in) {
            this.coins = in.readString();
            this.college = in.readString();
            this.exp = in.readString();
            this.gender = in.readString();
            this.grade = in.readString();
            this.icon = in.readString();
            this.id = in.readString();
            this.level = in.readString();
            this.nickname = in.readString();
            this.pushActivity = in.readByte() != 0;
            this.pushComment = in.readByte() != 0;
            this.pushLeaveWords = in.readByte() != 0;
            this.pushSystem = in.readByte() != 0;
            this.pushUrgentCollege = in.readByte() != 0;
            this.pushUrgentSchool = in.readByte() != 0;
            this.school = in.readString();
            this.token = in.readString();
        }

        public static final Parcelable.Creator<ResultBean> CREATOR = new Parcelable.Creator<ResultBean>() {
            @Override
            public ResultBean createFromParcel(Parcel source) {
                return new ResultBean(source);
            }

            @Override
            public ResultBean[] newArray(int size) {
                return new ResultBean[size];
            }
        };

        @Override
        public String toString() {
            return "ResultBean{" +
                    "coins='" + coins + '\'' +
                    ", college='" + college + '\'' +
                    ", exp='" + exp + '\'' +
                    ", gender='" + gender + '\'' +
                    ", grade='" + grade + '\'' +
                    ", icon='" + icon + '\'' +
                    ", id='" + id + '\'' +
                    ", level='" + level + '\'' +
                    ", nickname='" + nickname + '\'' +
                    ", pushActivity=" + pushActivity +
                    ", pushComment=" + pushComment +
                    ", pushLeaveWords=" + pushLeaveWords +
                    ", pushSystem=" + pushSystem +
                    ", pushUrgentCollege=" + pushUrgentCollege +
                    ", pushUrgentSchool=" + pushUrgentSchool +
                    ", school='" + school + '\'' +
                    ", token='" + token + '\'' +
                    ", blacklist=" + blacklist +
                    '}';
        }
    }
}
